<ion-view title="">
  <ion-content class="login-bg">
    <div style="text-align: center;"><img style="width: 60%;position: relative;top:100px"
                                          src="../assets/images/logoNew.png"/></div>
    <div class="register">
      <form novalidate ng-submit="vm.login()" name="loginForm">
        <div class="list list-inset">
          <div class="register-form">
            <p ng-show="vm.loginFailed" class="help-block">{{vm.loginFailed}}</p>

            <div class="item item-input input-wrap">
              <i class="icon ion-person placeholder-icon input-icon"></i>
              <input autocomplete="off" type="text" class="register-input" name="username"
                     ng-model="vm.form.username" placeholder="请输入手机号/用户名" ng-blur="vm.checkUsername();" required=""/>
            </div>
            <p class="password" ng-show="loginForm.username.$invalid && !loginForm.username.$pristine"
               class="help-block">此项为必填项</p>
          </div>


          <div class="register-form">
            <div class="item item-input input-wrap">
              <i class="icon ion-search placeholder-icon input-icon"></i>
              <input autocomplete="off" type="password" class="register-input" name="password"
                     ng-model="vm.form.password" placeholder="登录密码" ng-blur="vm.checkPassword();" required>
            </div>
            <p ng-show="loginForm.password.$invalid && !loginForm.password.$pristine" class="help-block">此项为必填项</p>
          </div>
        </div>

        <div class="but-submit">
          <button type="submit" class="button button-block button-assertive bt-font" ng-disabled="loginForm.$invalid">
            立即登录
          </button>
        </div>

      </form>
    </div>
  </ion-content>
</ion-view>
